home *** CD-ROM | disk | FTP | other *** search
/ PC for Alla 2005 May / PC för Alla 0505.iso / fullversioner / realsoft3d / data1.cab / Scripting / scripts / js / oops / r3font.js < prev    next >
Encoding:
JavaScript  |  2005-04-04  |  2.8 KB  |  116 lines

  1.  
  2. // JavaScript wrapper for r3font.h
  3. // Auto generated file, do not modify by hand
  4. // Copyright ⌐ 2004, Realsoft Graphics Oy
  5.  
  6. var R3_FONT_H = 1;
  7. include("oops/r3root.js")
  8.  
  9.  
  10. var R3CLID_FONT = 11;
  11.  
  12.  
  13.  
  14.  
  15. // Description: Find length of given string in pixels
  16. // Returns: Integer, length
  17. // p3: String, string whose length is to be measured
  18.  
  19. R3FM_GETSTRLENGTH = 11000;
  20.  
  21. function mR3FM_GETSTRLENGTH(p3) {
  22.   return   DoA(this.r3obj, 11000, p3, R3TID_STRING, 0);
  23. }
  24.  
  25. // Description: Prepare font for fetching outline curves.
  26. // Returns: Boolean, true if succeeded. Otherwise the R3RA_Error can
  27. // p3: Tag[], R3RA_Error.    
  28.  
  29. R3FM_BEGINOUTLINE = 11001;
  30.  
  31. function mR3FM_BEGINOUTLINE(p3) {
  32.   return   Do(this.r3obj, 11001, p3, R3TID_TAG, R3TNF_ARRAY);
  33. }
  34.  
  35. // Description: End outline char session.
  36.  
  37. R3FM_ENDOUTLINE = 11002;
  38.  
  39. function mR3FM_ENDOUTLINE() {
  40.   DoA(this.r3obj, 11002, 0, R3TID_INTEGER, 0);
  41. }
  42.  
  43. // Description: These methods are needed for fetching geometry of outline fonts. Not all fonts support
  44. //      this feature.
  45. // Returns: Boolean, true if character outline was succesfully fetched.
  46. // p1: Object, target object which can read outline description
  47. // p2: Integer, method with which the target object is called
  48. // p3: Integer, character to be outlined
  49.  
  50. R3FM_OUTLINECHAR = 11003;
  51.  
  52. function mR3FM_OUTLINECHAR(p1, p2, p3) {
  53.   return   DoA3(this.r3obj, 11003, p1, R3TID_OBJECT, 0, p2, R3TID_INTEGER, 0, p3, R3TID_INTEGER, 0);
  54. }
  55.  
  56.  
  57.  
  58.  
  59. R3FA_Font = 11500;
  60. function SetR3FA_Font(value) {
  61.   R3Set(this.r3obj, R3FA_Font, value, R3TID_STRING, 0); 
  62. }
  63.  
  64. function GetR3FA_Font() {
  65.   return R3Get(this.r3obj, R3FA_Font, R3TID_STRING, 0); 
  66. }
  67.  
  68. R3FA_Size = 11501;
  69. function GetR3FA_Size() {
  70.   return R3Get(this.r3obj, R3FA_Size, R3TID_INTEGER, 0); 
  71. }
  72.  
  73. R3FA_Ascent = 11504;
  74. function GetR3FA_Ascent() {
  75.   return R3Get(this.r3obj, R3FA_Ascent, R3TID_INTEGER, 0); 
  76. }
  77.  
  78. R3FA_Descent = 11505;
  79. function GetR3FA_Descent() {
  80.   return R3Get(this.r3obj, R3FA_Descent, R3TID_INTEGER, 0); 
  81. }
  82.  
  83. R3FA_XFont = 11506;
  84. function GetR3FA_XFont() {
  85.   return R3ToJS(R3Get(this.r3obj, R3FA_XFont, R3TID_OBJECT, 0)); 
  86. }
  87.  
  88. var R3FA_Italic = 11508; // Boolean
  89. var R3FA_Bold = 11509; // Boolean
  90. var R3FA_Underline = 11510; // Boolean
  91. var R3FA_Template = 11511; // Object
  92. var MAX_FONTNAMELEN = 80;
  93.  
  94.  
  95. function r3Font () { 
  96.    this.base = r3God;
  97.    if(arguments.length) {
  98.       this.base(R3CLID_FONT, arguments);
  99.    }
  100.    // Methods
  101.    this.GETSTRLENGTH=mR3FM_GETSTRLENGTH;
  102.    this.BEGINOUTLINE=mR3FM_BEGINOUTLINE;
  103.    this.ENDOUTLINE=mR3FM_ENDOUTLINE;
  104.    this.OUTLINECHAR=mR3FM_OUTLINECHAR;
  105.  
  106.    // Attributes
  107.    this.GetFont=GetR3FA_Font;
  108.    this.SetFont=SetR3FA_Font;
  109.    this.GetSize=GetR3FA_Size;
  110.    this.GetAscent=GetR3FA_Ascent;
  111.    this.GetDescent=GetR3FA_Descent;
  112.    this.GetXFont=GetR3FA_XFont;
  113. }
  114.  
  115. r3Font.prototype=new r3Root;
  116. // r3font.h_H